package org.example.controller;

import org.example.entity.home_carousel;
import org.example.service.home_carouselSerive;
import org.example.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("home_carousel")
public class home_carouselController {
    @Autowired
    private home_carouselSerive homeCarouselSerive;
    @GetMapping("banner")
    public R banner(home_carousel homeCarousel){
        List<home_carousel> banner = homeCarouselSerive.getBanner(homeCarousel);
        return R.ok(banner);
    }

}
